<!-- $Id: category_move.htm 14216 2008-03-10 02:27:21Z testyang $ -->
{include file="pageheader.htm"}
<div class="main-div">
    <form action="recommend.php" method="post" name="theForm" enctype="multipart/form-data" id="theForm">
        <table width="100%">
            <tr>
                <td>
                    <div style="font-weight:bold"><img src="images/notice.gif" width="16" height="16" border="0" />什么是转移代理商?</div>
                    <ul>
                        <li>在代理商管理中,如果需要对代理商的层级进行变更,那么你可以通过此功能,正确管理代理商层级。</li>
                    </ul>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <strong style="font-size:13px">{$rank.recommend_name}</strong>&nbsp;&nbsp;
                    <strong style="margin-left:35px;font-size:13px">{$rank.recommend_agency_rank}级代理商</strong>
                    <strong style="margin-left:30px;font-size:13px">变更为</strong>&nbsp;&nbsp;
                    <select name="recommend_agency_rank" onchange="select(this,{$rank.recommend_id})">
                        {foreach from=$ranks item=val}
                            <option value="{$val.recommend_agency_rank}">{$val.recommend_agency_rank}级代理商</option>
                            {if $val.recommend_agency_rank eq $max_rank1}
                                <option value="{$max_rank2}">{$max_rank2}级代理商</option>
                            {/if}
                        {/foreach}
                    </select>&nbsp;&nbsp;

                    <select name="recommend_parent_id" id="recommend">
                    </select>&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="submit" name="move_cat" value="修改" class="button"/>
                    <input type="hidden" name="recommend_id" value="{$rank.recommend_id}"/>
                    <input type="hidden" name="act" value="move_update"/>
                    <input type="hidden" name="old_rank" value="{$rank.recommend_agency_rank}"/>
                </td>
            </tr>
        </table>
    </form>
</div>

{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">

    onload = function()
    {
        // 开始检查订单
        startCheckOrder();
        document.getElementById("recommend").style.display='none';
        document.getElementById("theForm").reset();
    }

    function select(obj, id){
        var opt =obj.value;

        res = Ajax.call('recommend.php', "act=move_change&level="+opt+"&id="+id,null, "GET", "HTML", false);

        if(res){
            document.getElementById("recommend").style.display='';
            document.getElementById("recommend").innerHTML = res;
        }else{
            document.getElementById("recommend").style.display='none';
        }
    }

</script>
{/literal}
{include file="pagefooter.htm"}